Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

601
Visualizações
File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module, ModuleNotFoundError: No module named 'x'

EDIT

I'm trying to import algosec.models in a file inside the algobot package.

I've tried to add --hidden-import algosec, I've also tried to add the path before importing, using sys.path.append(./../algosec) this is the error message I get when I try to run the program:

Traceback (most recent call last):
  File "algobot_packer/algobot.py", line 2, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "algobot/cli/cli.py", line 3, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "algobot/microsoft_teams/mainloop.py", line 9, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "algobot/framework/configuration.py", line 34, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "algobot/framework/commands.py", line 22, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "algobot/framework/bot.py", line 4, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
  File "algobot/framework/responses.py", line 9, in <module>
ModuleNotFoundError: No module named 'algosec'

the folder structure is:

  • algobot
    • algobot
    • algosec
    • algobot-packer
    • pyucwa

I'm using pyinstaller version 4.2 I didn't make any change in the code since the last time my executable file ran perfectly fine, but now I'm getting this error every time. the thing is - the folder 'algosec' is a subdirectory in my project, and it is noted in the pipfile and again, I didn't make any change in a while and tested it recently (last tested on July 8th)), therefore I believe that it's a dependency issue but not sure which or how to solve.

I've tried multiple changes that somehow worked on one run but when I tried to make these changes again it failed on other builds...

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You can use
--add-data "path_to_algobot:."
based on your system for windows use ; and for linux use :

It will explicitly add your algosec folder into the package.

over 4 years ago · Santiago Trujillo Relatório

0

Apparently since I took the highest version of zeep and deprecated without giving a fixed version, it caused issues because of a newer release. I had to add them to setup.py of the algobot package which is the main package of the executable with a fixed version.

In addition I had to add a .egg file of the algosec package with --paths in order for pyinstaller to find it.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda